@using Abc.Core;
@using Abc.Application;
@model Abc.Application.PermissionOut;
@{
    ViewData["Title"] = "PermissionInfo";
}

<section class="panel panel-padding">
    <div class="layui-tab layui-tab-brief" lay-filter="docDemoTabBrief">

        <form class="layui-form" action="">
              <input type="hidden" asp-for="Id" />
                  <div class="layui-form-item">
                    <label class="layui-form-label">类型代码</label>
                     <div class="layui-input-block">
                     </div>
                   </div>

                  <div class="layui-form-item">
                    <label class="layui-form-label">控制器</label>
                     <div class="layui-input-block">
                           <input  asp-for="Controller" lay-verify="Controller" autocomplete="off" placeholder="请输入控制器" class="layui-input">
                     </div>
                   </div>

                  <div class="layui-form-item">
                    <label class="layui-form-label">名称</label>
                     <div class="layui-input-block">
                           <input  asp-for="Name" lay-verify="Name" autocomplete="off" placeholder="请输入名称" class="layui-input">
                     </div>
                   </div>

                  <div class="layui-form-item">
                    <label class="layui-form-label">方法/Action名称,多个用英文逗号隔开</label>
                     <div class="layui-input-block">
                           <input  asp-for="Actions" lay-verify="Actions" autocomplete="off" placeholder="请输入方法/Action名称,多个用英文逗号隔开" class="layui-input">
                     </div>
                   </div>

                  <div class="layui-form-item">
                    <label class="layui-form-label">备注</label>
                     <div class="layui-input-block">
                           <input  asp-for="Remark" lay-verify="Remark" autocomplete="off" placeholder="请输入备注" class="layui-input">
                     </div>
                   </div>

                  <div class="layui-form-item">
                    <label class="layui-form-label">是否系统菜单</label>
                     <div class="layui-input-block">
                         @*<input type="checkbox" asp-for="IsSystem" lay-skin="primary" title="" checked="">
                           <input type="checkbox" name="like[read]" title="阅读" checked="">*@
                         <input type="checkbox" asp-for="IsSystem" lay-skin="switch" lay-text="开|关">
                     </div>
                   </div>

                  <div class="layui-form-item">
                    <label class="layui-form-label">IsDisuse</label>
                     <div class="layui-input-block">
                         @*<input type="checkbox" asp-for="IsDisuse" lay-skin="primary" title="" checked="">
                           <input type="checkbox" name="like[read]" title="阅读" checked="">*@
                         <input type="checkbox" asp-for="IsDisuse" lay-skin="switch" lay-text="开|关">
                     </div>
                   </div>

                  <div class="layui-form-item">
                    <label class="layui-form-label">是否自动生成</label>
                     <div class="layui-input-block">
                         @*<input type="checkbox" asp-for="IsAutoGeneration" lay-skin="primary" title="" checked="">
                           <input type="checkbox" name="like[read]" title="阅读" checked="">*@
                         <input type="checkbox" asp-for="IsAutoGeneration" lay-skin="switch" lay-text="开|关">
                     </div>
                   </div>

            <div class="layui-form-item">
                <div class="layui-input-block">
                    <div class="layui-btn" lay-submit lay-filter="submit">提交数据</div>
                    <div class="layui-btn layui-btn-danger closewindow">关闭窗口</div>
                    <div class="layui-btn layui-btn-danger refreshwindow">重新加载</div>
                </div>
            </div>
        </form>
    </div>
</section>

@*<script src="~/lib/ckeditor4/ckeditor.js"></script>*@
@section Scripts{
     <script>
         layui.define(['element', 'jquery', 'form'], function () {
             lef $ = layui.jquery;
             lef  form = layui.form;
             lef  element = layui.element;

             //Info 初始化
             app.infoInit();
             //提交
             form.on('submit(submit)', function (obj) {
                 //obj.field.IsEnable=$('#IsEnable').is(':checked');
                 //obj.field.Remark = Remark.getContent();
                 $.post("@(Url.Action("Edit"))", obj.field, function (result) {
                     if (result.State) {
                         //var index = parent.layer.getFrameIndex(window.name);
                         //parent.layer.close(index);//关闭当前页
                     }
                     layer.msg(result.Msg);
                 });

                 return false;
             });

         });
     </script>
}